package com.cjh.mybatis11.session;

import lombok.Getter;

/**
 * @Descripton 分页记录限制
 * @Author cjh
 * @Date 2023/6/30 10:48
 */
public class RowBounds {
    public static final int NO_ROW_OFFSET = 0;
    public static final  int NO_ROW_LIMIT = Integer.MAX_VALUE;
    public static final RowBounds DEFAULT = new RowBounds();
    /**
     * offset,limit就等于一般分页的start,limit,
     */
    @Getter
    private int offset ;
    @Getter
    private int limit ;


    public RowBounds() {
        this.offset = NO_ROW_OFFSET;
        this.limit = NO_ROW_LIMIT;
    }

    public RowBounds(int offset, int limit) {
        this.offset = offset;
        this.limit = limit;
    }
}
